//
//  BadgeView.m
//  PigMarket
//
//  Created by Felix on 2019/3/23.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import "BadgeView.h"

@interface BadgeView ()

@end

@implementation BadgeView

#pragma mark - init method
- (instancetype)init
{
    self = [super init];
    if (self) {
        [self initView];
        [self initLayout];
    }
    return self;
}
- (instancetype)initNumBadgeView {
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor colorWithHexString:@"#00c600"];
        self.layer.cornerRadius = 6.5;
        [self addSubview:self.numLabel];
        [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(4).priorityHigh();
            make.right.mas_equalTo(-4).priorityHigh();
            make.top.bottom.mas_equalTo(0);
        }];
    }
    return self;
}

- (void)initView {
    // 添加子控件
    
}

- (void)initLayout {
    // 布局子控件
    
}

#pragma mark - getter and setter

- (UILabel *)numLabel {
    if (!_numLabel) {
        _numLabel = [[UILabel alloc] init];
        _numLabel.textColor = [UIColor colorWithHexString:@"#ffffff"];
        _numLabel.font = [UIFont systemFontOfSize:11];
    }
    return _numLabel;
}

@end
